package com.atguigu.gulimall.product.vo;


import com.atguigu.common.valid.AddGroup;
import com.atguigu.common.valid.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.List;

@Data
public class AttrEntityVo implements Serializable {

    /**
     * 属性id
     */
    @NotNull(message = "属性id不能为空！",groups = {UpdateGroup.class})
    @Null(message = "属性id不能赋值！",groups = {AddGroup.class})
    private Long attrId;
    /**
     * 属性名
     */
    @NotBlank(message = "属性名称不能为空！",groups = {AddGroup.class,UpdateGroup.class})
    private String attrName;
    /**
     * 是否需要检索[0-不需要，1-需要]
     */

    @NotNull(message = "属性检索不能为空！",groups = {AddGroup.class,UpdateGroup.class})
    private Integer searchType;
    /**
     * 属性图标
     */
    @NotBlank(message = "属性图标不能为空！",groups = {AddGroup.class,UpdateGroup.class})
    private String icon;
    /**
     * 可选值列表[用逗号分隔]
     */
    private String valueSelect;
    /**
     * 属性类型[0-销售属性，1-基本属性，2-既是销售属性又是基本属性]
     */
    @NotNull(message = "属性类型不能为空！",groups = {AddGroup.class,UpdateGroup.class})
    private Integer attrType;
    /**
     * 启用状态[0 - 禁用，1 - 启用]
     */
    @NotNull(message = "启用状态不能为空！",groups = {AddGroup.class,UpdateGroup.class})
    private Long enable;
    /**
     * 所属分类
     */
    @NotNull(message = "所属分类不能为空！",groups = {AddGroup.class,UpdateGroup.class})
    private Long catelogId;
    /**
     * 快速展示【是否展示在介绍上；0-否 1-是】，在sku中仍然可以调整
     */
    @NotNull(message = "快速展示不能为空！",groups = {AddGroup.class,UpdateGroup.class})
    private Integer showDesc;

    /**
     * 属性分组id 用于保存 attr-group 数据
     */
    @NotNull(message = "属性分组不能为空！",groups = {AddGroup.class,UpdateGroup.class})
    private Long attrGroupId;

    private String catelogName;

    private String groupName;

    private List<Long> catelogPath;
}
